-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#798 - PackageReivsion deletionProposed sometimes deletes the packageRevision #99
Conversation
/retest |
I may be wrong, but it seems to me that by deleting those lines from the code you removed the following functionality from porch: Could you elaborate on the reasons and implications of removing this functionality? |
Hey @kispaljr, thanks for your feedback. |
Thank you for the clarification. I think I understand it much better now. |
In the latest commit, I've reverted the removal of the ownerRefs and changed the flow in repo.go to send a notification of the packagerevision change first before creation of the packageRev. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
/approve
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nit pick
/approve |
1 similar comment
/approve |
@kispaljr does the later changes address your concerns? |
sorry, I haven't got the time to review the new version till now. I still cannot see however, how this change guarantees that the parent PackageRevision exists in the porch server by the time the PackageRev is created in the etcd. Please note, that I am not saying that it doesn't guarantee it, I just don't see why, and I am afraid that it only decreases the probability of the race condition to happen by delaying the creation of PackageRevs with the time it takes to send out the notifications. |
Since as I stated there is no doubt that this is an improvement, and the solution was tested so we are sure that in practice it solves the original issue, please ignore my theoretical thoughts above and let's merge this. /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Catalin-Stratulat-Ericsson, efiacor, kispaljr, kushnaidu, liamfallon The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hey Istvan, |
Yeah, the race condition doesn't fully disappear. If the kube-controller-manager is processing through notifications from porch much slower than processing through notifiactions from kube-apiserver's pkgrev watch, the same issue can happen. But this can happen between any 2 resources, regardless of which component serves it. I'll check whether there is a safeguard against this in the garbage collector. |
resolves nephio-project/nephio#798
This change sends a notification of packageRevision change before creating packageRev to avoid the race condition of an invalid ownerRef uid for packageRev, which causes k8s to add a deletionTimestamp to the packageRevs.